﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FrozenBullet : Bullet {

    [SerializeField] float slowSpeed;
    public FrozenBullet(float flySpeed, float damage, float shootSpeed) : base(flySpeed, damage, shootSpeed)
    {
    }
    // Use this for initialization
    void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("Block_1") || other.gameObject.CompareTag("Block_2"))
        {
            other.gameObject.SendMessage("TakeDamage", damage);
            //GameObject game=GameObject.FindGameObjectWithTag
            //other.gameObject.SendMessage("SlowDown", slowSpeed);
        }
        Debug.Log(1);
        Destroy(this.gameObject);
    }
}
